package com.bruip.spring.controller;

import com.bruip.spring.service.BookService;
import com.bruip.spring.service.CheckoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @author 王若龙
 * @CreateTime 2022-09-03 11:22
 */
@Controller
public class BookController {


    @Autowired
    private BookService bookService;

    @Autowired
    private CheckoutService checkoutService;

    public void buyBook(Integer userId, Integer bookId){
        bookService.buyBook(userId, bookId);
    }

    public void checkout(Integer userId, Integer[] bookIns){
        checkoutService.checkout(userId, bookIns);
    }
}
